package com.xmall.msg.queue;

/**
 * 商品模块
 */
public interface ProductModule {

    /**
     * 库存锁定
     */
    interface StockLock {
        String STOCK_LOCK_FANOUT_EXCHANGE = "product.stock.lock.fanout.exchange";
        String STOCK_LOCK_QUEUE = "product.stock.lock.queue";
        String STOCK_LOCK_ROUTING_KEY = "product.stock.lock.key";
    }

    /**
     * 公共交换机
     */
    interface CommonExchange {
        String STOCK_DIRECT_EXCHANGE = "product.stock.direct.exchange";
    }

    /**
     * 锁定库存检查（延时执行）
     */
    interface StockLockCheck {
        String DELAY_STOCK_LOCK_CHECK_QUEUE = "product.delay.stock.lock.check.queue";
        String DELAY_STOCK_LOCK_CHECK_ROUTING_KEY = "product.delay.stock.lock.check.key";

        String STOCK_LOCK_CHECK_QUEUE = "product.stock.lock.check.queue";
        String STOCK_LOCK_CHECK_ROUTING_KEY = "product.stock.lock.check.key";
    }

    /**
     * 库存恢复
     */
    interface StockRevert {
        String STOCK_REVERT_QUEUE = "product.stock.revert.queue";
        String STOCK_REVERT_ROUTING_KEY = "product.stock.revert.key";
    }

    /**
     * 库存扣减
     */
    interface StockDeduct {
        String STOCK_DEDUCT_QUEUE = "product.stock.deduct.queue";
        String STOCK_DEDUCT_ROUTING_KEY = "product.stock.deduct.key";
    }

    /**
     * 订单取消
     */
    interface OrderCancel {
        String ORDER_CANCEL_QUEUE = "product.order.cancel.queue";
        String ORDER_CANCEL_ROUTING_KEY = "product.order.cancel.key";
    }

    /**
     * 订单支付成功
     */
    interface OrderPaySuccess {
        String ORDER_PAY_SUCCESS_QUEUE = "product.order.pay.success.queue";
        String ORDER_PAY_SUCCESS_ROUTING_KEY = "product.order.pay.success.key";
    }

    /**
     * 商品更新
     */
    interface ProductUpdate {
        String PRODUCT_UPDATE_FANOUT_EXCHANGE = "product.product.update.fanout.exchange";
        String PRODUCT_UPDATE_QUEUE = "product.product.update.queue";
        String PRODUCT_UPDATE_ROUTING_KEY = "product.product.update.key";
    }

    /**
     * 商品删除
     */
    interface ProductDelete {
        String PRODUCT_DELETE_FANOUT_EXCHANGE = "product.product.delete.fanout.exchange";
        String PRODUCT_DELETE_QUEUE = "product.product.delete.queue";
        String PRODUCT_DELETE_ROUTING_KEY = "product.product.delete.key";
    }

}
